Skip to content

Comments

Improve CI/CD workflows (and support merge queues)#58

Merged
HappyPaul55 merged 2 commits intomainfrom
improve-cd-cd-workflows
May 21, 2025
Merged

Improve CI/CD workflows (and support merge queues)#58
HappyPaul55 merged 2 commits intomainfrom
improve-cd-cd-workflows

Conversation

@HappyPaul55
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 21, 2025 12:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors CI/CD pipelines by extracting common logic into reusable subworkflows and adding support for merge queues in feature builds.

  • Introduces three subworkflows for build, deploy, and release steps
  • Removes legacy pr_build.yml and branch_build.yml in favor of the new subworkflows
  • Adds orchestrator workflows (main_merge.yml, feature_build.yml) that wire up the subworkflows with proper concurrency and merge-queue support

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/subworkflow-release.yml New release subworkflow for tagging, releasing, and registry registration
.github/workflows/subworkflow-deploy.yml New deploy subworkflow for PR demo environments using Docker SSH context
.github/workflows/subworkflow-build.yml New build subworkflow handling lint, test, build, and version tagging
.github/workflows/pr_build.yml Removed legacy PR build workflow
.github/workflows/branch_build.yml Removed legacy branch build workflow
.github/workflows/main_merge.yml Orchestrates main branch CI with build and release subworkflows
.github/workflows/feature_build.yml Orchestrates feature PR CI with merge-queue support
Comments suppressed due to low confidence (1)

.github/workflows/subworkflow-build.yml:6

  • [nitpick] Consider renaming the input push-tag to snake_case (e.g., push_tag) to align with common GitHub Actions input naming conventions and avoid potential parsing issues.
push-tag:

id: package
working-directory: app-package
run: |
packageFilename=`jq -r .name manifest.json | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z`
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sed expression may not correctly trim leading/trailing hyphens due to incorrect escaping of the alternation. Switch to a grouped regex like sed -r 's/(^-+|-+$)//g' to handle both cases properly.

Suggested change
packageFilename=`jq -r .name manifest.json | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z`
packageFilename=`jq -r .name manifest.json | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r 's/(^-+|-+$)//g' | tr A-Z a-z`

Copilot uses AI. Check for mistakes.
https://api.github.com/repos/deskpro/deskpro-product/contents/docker/compose/deskpro-demo/docker-compose.yml

- name: Create Docker SSH context
uses: deskpro/gh-actions/create-ssh-docker-context@master
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin the action version to a specific commit SHA or semver tag instead of relying on @master to ensure workflow stability and reproducibility.

Copilot uses AI. Check for mistakes.

- name: Deploy demo
id: deployment
uses: deskpro/gh-actions/deploy-deskpro-demo@master
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin the action version to a specific commit SHA or semver tag instead of relying on @master to ensure workflow stability and reproducibility.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

@HappyPaul55 HappyPaul55 merged commit 869a38a into main May 21, 2025
5 checks passed
@HappyPaul55 HappyPaul55 deleted the improve-cd-cd-workflows branch May 21, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant